﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SedCup.Code.Model;

namespace SedCup.Code.Control
{
    public class Responder
    {
        public static ServerResponse GetResponse()
        {
            ServerResponse ret = new ServerResponse();

            /*
            public string status;
        public int secondsLeft;
        public int turn;
        public int money;
        public List<Agent> agents;
        public List<Task> tasks;
        public List<Headquarter> headQuarters;
        public int mapSize;
        public Dictionary<int, List<int>> roadBlocks;
             * */
            ret.secondsLeft = 96;
            ret.turn = 5;
            ret.money = 172;
            ret.mapSize = 25;

            ret.agents = new List<Agent>();
            Agent agent = new Agent();
            agent.agentId = "agent000";
            agent.coordinate = 1;
            agent.owner = "me";
            agent.type = "guru";
            ret.agents.Add(agent);

            agent = new Agent();
            agent.agentId = "agent001";
            agent.coordinate = 8;
            agent.owner = "me";
            agent.type = "senior";
            ret.agents.Add(agent);

            agent = new Agent();
            agent.agentId = "agent001";
            agent.coordinate = 7;
            agent.owner = "enemy";
            agent.type = "guru";
            ret.agents.Add(agent);

            agent = new Agent();
            agent.agentId = "agent002";
            agent.coordinate = 7;
            agent.owner = "me";
            agent.type = "guru";
            ret.agents.Add(agent);

            agent = new Agent();
            agent.agentId = "agent000";
            agent.coordinate = 2;
            agent.owner = "enemy";
            agent.type = "junior";
            ret.agents.Add(agent);

            ret.tasks = new List<Task>();
            Task task = new Task();
            task.coordinate = 1;
            task.duration = 10;
            task.penalty = 5;
            task.profit = 10;
            task.remaining = 10;
            task.status = "free";
            task.type = "java";

            ret.tasks.Add(task);

            ret.headQuarters = new List<Headquarter>();

            Headquarter hq = new Headquarter();
            hq.coordinate = 7;
            hq.owner = "me";
            ret.headQuarters.Add(hq);

            hq = new Headquarter();
            hq.coordinate = 9;
            hq.owner = "enemy";
            ret.headQuarters.Add(hq);

            ret.roadBlocks = new Dictionary<int, List<int>>();
            List<int> roadBlock = new List<int>();
            roadBlock.Add(2);
            roadBlock.Add(6);
            ret.roadBlocks.Add(1, roadBlock);

            return ret;
        }
    }
}
